-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Artisanal production + buying from market #230
base: master
Are you sure you want to change the base?
Conversation
src/openvic-simulation/economy/production/ArtisanalProducer.cpp
Outdated
Show resolved
Hide resolved
src/openvic-simulation/economy/production/ArtisanalProducer.cpp
Outdated
Show resolved
Hide resolved
src/openvic-simulation/economy/production/ArtisanalProducer.cpp
Outdated
Show resolved
Hide resolved
src/openvic-simulation/economy/production/ArtisanalProducer.cpp
Outdated
Show resolved
Hide resolved
eac4711
to
98ed3fa
Compare
ba40193
to
00d84ea
Compare
b6eb317
to
1939e7c
Compare
9fba632
to
4a8ef4d
Compare
1939e7c
to
72c6e54
Compare
e704edf
to
02c146b
Compare
f3370e7
to
835231f
Compare
{} | ||
|
||
void ArtisanalProducer::artisan_tick() { | ||
GoodDefinition::good_definition_map_t goods_to_buy_and_max_price { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we merge artisanal inputs and pop needs?
Can pops consume their own produce?
How is money allocated between inputs and needs?
835231f
to
72c6040
Compare
02c146b
to
4e8897d
Compare
52be17e
to
aa58b23
Compare
898b598
to
98d7f85
Compare
GoodInstance const& good_instance = market_instance.get_good_instance_manager().get_good_instance_from_definition( | ||
production_type.get_output_good() | ||
); | ||
if (!good_instance.get_is_available()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are artisanal production types unlocked globally or per country?
If per country, we need to add that here.
98d7f85
to
463e645
Compare
aa58b23
to
6cca419
Compare
8ba4fe8
to
6ce5e09
Compare
092a655
to
e943341
Compare
e943341
to
bd97d8f
Compare
00063dc
to
6cf07b5
Compare
6cf07b5
to
342373c
Compare
342373c
to
b9882a8
Compare
Artisans will buy inputs from the market using BuyUpToOrder.
They will buy up to
input amount - amount in stockpile
.As each input can bottleneck production, artisans aim to maximise
min(inputs satisfied)
.Based on this they allocate money to buy the inputs.
Each GoodInstance has a maximum next price, this is the price artisans take into account when allocating funds.